#—*—coding:utf-8 -*-
#@Time        :2022/7/17 23:04
#@Author      :dhx
#@File        :create_pay_add_pages.py
# @Software: PyCharm
from time import sleep

from selenium.webdriver.common.by import By
from pages.finance_page import FinancePage

class AddPay(FinancePage):
    url='http://192.168.3.133/crm/index.php?m=finance&a=index&t=payables'
    add_locator = (By.XPATH, '/html/body/div[5]/div[2]/div[1]/div[3]/a[1]')  # 点击添加应付款
    change_locator = (By.XPATH, '//*[@id="form1"]/table/tbody/tr[1]/td[11]/a[2]')  # 点击修改
    def add_pay(self):
        """添加应付款"""
        self.driver.find_element(*self.add_locator).click()
    def modif_pay(self):
        """点击修改"""
        self.driver.find_element(*self.change_locator).click()
        sleep(1)

